package com.css.zfzx.sjcj.modules.hddcB2GeomorphySvyProjectTable.repository;

import com.css.zfzx.sjcj.modules.hddcA1InvRgnHasMaterialTable.repository.entity.HddcA1InvrgnhasmaterialtableEntity;
import com.css.zfzx.sjcj.modules.hddcB2GeomorphySvyProjectTable.repository.entity.HddcB2GeomorphysvyprojecttableEntity;
import com.css.zfzx.sjcj.modules.hddccjtask.repository.entity.HddcCjTaskEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * @author zyb
 * @date 2020-12-07
 */
public interface HddcB2GeomorphysvyprojecttableRepository extends JpaRepository<HddcB2GeomorphysvyprojecttableEntity, String> {
    @Modifying
    @Query(nativeQuery = true,value = "update hddc_b2_geomorphysvyprojecttable set qualityinspection_status=:qualityinspection_status,extends1=:extend1 where workregionid=:workregionid")
    void updateStatus(String qualityinspection_status, String extend1,String workregionid);
    @Modifying
    @Query(nativeQuery = true,value = "update hddc_b2_geomorphysvyprojecttable set qualityinspection_status=:qualityinspection_status,extends2=:extend2 where targetregionid=:targetregionid")
    void updateStatus2(String qualityinspection_status, String extend2,String targetregionid);
    @Modifying
    @Query(nativeQuery = true,value = "update hddc_b2_geomorphysvyprojecttable set qualityinspection_status=:s,extends3=:str where mainafsregionid=:id")
    void updateStatus3(String s, String str, String id);

    @Query(nativeQuery=true,value = "select * from hddc_b2_geomorphysvyprojecttable where is_valid=1 and extends10=1")
    List<HddcB2GeomorphysvyprojecttableEntity> findByAll();

    HddcB2GeomorphysvyprojecttableEntity findByUuidAndIsValid(String id, String isValid);
}
